#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>

int main(){

printf("Debut du program principal\n");

int x=getpid();
printf("My process id is: %d \n\n", x);

int newid = fork();
if (newid == 0){
	fprintf(stdout,"==>CHILD PID=%d\n\n",getpid());
}
else if (newid < 0){
	fprintf(stdout,"==>FAILED to create a child process \n\n");
	exit(1);
}
else
{
	printf("Fin du program principal\n\n");
}


return 0;
}
